<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>恒瑞国际</title>
    <link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css">
</head>
<body>
<div class="container-fluid">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>名称</th>
            <th>最新</th>
            <th>现手</th>
            <th>买价</th>
            <th>卖价</th>
            <th>买量</th>
            <th>卖量</th>
            <th>成交量</th>
            <th>昨持仓</th>
            <th>涨跌</th>
            <th>开盘</th>
            <th>最高</th>
            <th>最低</th>
            <th>涨幅</th>
            <th>昨结算</th>
            <th>时间</th>
        </tr>
        </thead>
        <tbody id="list">
        {volist name="list" id="vo"}
        <tr>
            <td>{$vo.name}</td>
            <td class="orange">55.65</td>
            <td>1</td>
            <td class="green">55.70</td>
            <td class="red">56.20</td>
            <td>6</td>
            <td>4</td>
            <td>1200</td>
            <td>123456</td>
            <td class="red">0.21</td>
            <td>66.21</td>
            <td class="green">66.68</td>
            <td class="red">56.11</td>
            <td class="green">0.26</td>
            <td>59.50</td>
            <td class="blue">00:20:10</td>
        </tr>
        {/volist}
        </tbody>
    </table>
</div>
<div class="exchange bg-1a">
    <ul>
        <li><a href="" class="white exchange-bg">中金所CFFEX</a></li>
        <li><a href="" class="white">纽约NYMEX</a></li>
        <li><a href="" class="white">纽约COMEX</a></li>
        <li><a href="" class="white">香港HKEx</a></li>
        <li><a href="" class="white">芝加哥CBOT</a></li>
        <li><a href="" class="white">芝加哥CME</a></li>
        <li><a href="" class="white">瑞士EUREX</a></li>
        <li><a href="" class="white">自选</a></li>
    </ul>
</div>
<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
<script>
    var zjs = [
        ['IC主力', 'nf_IC0'],
        ['IC1810', 'nf_IC1810'],
        ['IC1811', 'nf_IC1811'],
        ['IC1812', 'nf_IC1812'],
        ['IC1903', 'nf_IC1903'],
        ['IH主力', 'nf_IH0'],
        ['IH1810', 'nf_IH1810'],
        ['IH1811', 'nf_IH1811'],
        ['IH1812', 'nf_IH1812'],
        ['IH1903', 'nf_IH1903'],
        ['IF主力', 'nf_IF0'],
        ['IF1810', 'nf_IF1810'],
        ['IF1811', 'nf_IF1811'],
        ['IF1812', 'nf_IF1812'],
        ['IF1903', 'nf_IF1903'],
        ['十债主力', 'nf_T0'],
        ['十债1812', 'nf_T1812'],
        ['十债1903', 'nf_T1903'],
        ['十债1906', 'nf_T1906'],
        ['五债主力', 'nf_TF0'],
        ['五债1812', 'nf_TF1812'],
        ['五债1903', 'nf_TF1903'],
        ['五债1906', 'nf_TF1906'],
        ['二债主力', 'nf_TS0'],
        ['二债1812', 'nf_TS1812'],
        ['二债1903', 'nf_TS1903'],
        ['二债1906', 'nf_TS1906']
    ];
    price_data(zjs);
    function price_data(data) {
        var codes = [];
        $.each(data, function (item, value) {
            codes.push(value[1])
        });
        $.ajax({
            cache: true,
            url: 'https://hq.sinajs.cn/?list=' + codes,
            type: 'GET',
            dataType: 'script',
            success: function () {
                $.each(data, function (item, value) {
                    var elements = 'hq_str_' + value[1];
                    elements = eval(elements).split(",");
                    console.log(elements);
                });
            }
        });
        console.log(codes);
    }
</script>
</body>
</html>